<div class="panel-default">
  <table lay-filter="demo" lay-size='lg'>
    <thead>
      <tr>

        <th lay-data="{field:'img'}"><%= TechnicalCore.human_attribute_name(:img) %></th>

        <th lay-data="{field:'title'}"><%= TechnicalCore.human_attribute_name(:title) %></th>

        <th lay-data="{field:'content'}"><%= TechnicalCore.human_attribute_name(:content) %></th>

        <th lay-data="{field:'operation',width:200}"></th>
      </tr>
    </thead>

    <tbody>
      <% @technical_cores.each do |technical_core| %>
        <tr>

          <td><%= image_tag technical_core.img_url, size: '30x30' rescue '' %></td>

          <td><%= technical_core.title %></td>

          <td><%= technical_core.content %></td>

          <td>
            <%= link_to edit_admin_technical_core_path(technical_core), remote: true, class: "label" do -%><i class="iconfont icon-bianji"></i>编辑<% end %>
            <%= link_to [:admin, technical_core], method: :delete, data: { confirm: '确定删除吗? 注意此操作无法撤销！' }, class: "label label-danger" do -%><i class="iconfont icon-shanchu"></i>删除<% end %>
          </td>
        </tr>
      <% end %>
    </tbody>
  </table>
  <%= link_to new_admin_technical_core_path, remote: true do -%><button type="button" class="layui-btn"><i class="layui-icon">&#xe608;</i> <%= t('actions.new') + TechnicalCore.model_name.human %></button><% end %>
  <!-- 分页 -->
  <%= render 'admin/public_views/page', record: @technical_cores, record_count: @technical_cores.count %>
</div>

<div id="add_technical_core" style="display: none; padding: 20px"></div>

<!-- 放大图片 -->
<div class='elastic_show' hidden>
  <!-- 黑影 -->
  <div class="mask" hidden></div>
  <%= image_tag ''%>
</div>